package com.nf.entity;

public class FoodFactory {
    public static Food factory(String name){
        if("apple".equals(name)){
            return new Apple();
        }else if("banana".equals(name)){
            return new Banana();
        }return null;
    }
}
